import re

str1='199  3670  1102  ,  湖南岳阳'
# print(re.sub('\d','123',str1,count=0,flags='1111'))


# str1=str1.replace(' ','')
# print(str1)
result_01=re.sub('(\d+)\s+(\d+)\s+(\d+)',r'\1\2\3',str1)
print(result_01)
result_02=re.sub('\s,.*$','',str1)
print(result_02)